<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>includes</title>
</head>

<body>
    <script>
        url = 'https://ilive.lenovo.com.cn/?'
        var i = 0;
        const gu = (url, valun, key) => {


            if (url.includes('?')) {
                // if(url.includes('?&')){
                    
                // }
                if(i!=0)
                url += '&';
            } else {
                url += '?';
            }


            url += `${key}=${valun}`
            i++;
            return url;
        }
        
        url=gu(url, 'sette', 'f');
        console.log(url);
       url= gu(url, 'sette','fe');
        console.log(url);
    </script>
</body>

</html>